console.log("my.js loaded");

// 向页面注入JS
function injectCustomJs(jsPath)
{
    jsPath = jsPath || 'js/share.js';
    var temp = document.createElement('script');
    temp.setAttribute('type', 'text/javascript');
    // 获得的地址类似：chrome-extension://ihcokhadfjfchaeagdoclpnjdiokfakg/js/inject.js
    temp.src = chrome.extension.getURL(jsPath);
    temp.onload = function()
    {
        // 放在页面不好看，执行完后移除掉
        this.parentNode.removeChild(this);
    };
    document.body.appendChild(temp);
}

injectCustomJs();
// injectCustomJs('js/jquery-3.6.0.js');

function myFunc2(){
    console.log("My Func2,Hello.");
}


myFunc2();


// console.log($('body').html("<h1>Hello</h1>"));


